package com.enumdemo;

import java.util.EnumMap;
import java.util.Map;

enum DataBaseType {
	MYSQL, ORACLE, DB2, SQLSERVER
}

public class EnumMapDemo {

	private static Map<DataBaseType, String> urls = new EnumMap<DataBaseType, String>(
			DataBaseType.class);

	public static void main(String[] args) {
		urls.put(DataBaseType.DB2, "jdbc:db2://localhost:5000/sample");
		urls.put(DataBaseType.MYSQL, "jdbc:mysql://localhost/mydb");
		urls.put(DataBaseType.ORACLE, "jdbc:oracle:thin:@localhost:1521:sample");
		urls.put(DataBaseType.SQLSERVER, "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydb");

		for (String s : urls.values()) {
			System.out.println(s);
		}
	}

}
